package bean.commande;

import java.sql.Date;
import java.util.GregorianCalendar;

import bean.client.Client;

public class Commande {
	
	private int id_commande;
	private Date dateCommande ;
	private String numFactureCommand;
	private String pathFileFacture;
	private String ligneAchat;
	private String etatCommande;
	private Client compte;
	private int id_adresseLivraison;
	private int id_adresseFacturation;
	private int id_typePaiement;
	private int id_typeLivraison;
	private double montantCommande;
	private String nomClient;
	private String etatPaiement;

	public Commande(){}

	public Commande(int idCommande, String nomCompte, Date dateCommande)
	{
		this.id_commande = idCommande;
		this.nomClient= nomCompte;
		this.dateCommande = dateCommande;		
	}
	
	public Commande(int idCommande, Client compte, Date dateCommande)
	{
		this.id_commande = idCommande;
		this.compte = compte;
		this.dateCommande = dateCommande;		
	}
	
	public String getNomClient() {
		return nomClient;
	}

	public void setNomClient(String nomClient) {
		this.nomClient = nomClient;
	}

	public Commande(int idCommande, Date dateCommande,
			String numFactureCommand, String pathFileFacture,
			String ligneAchat, String etatCommande, Client compte) {
		this.id_commande = idCommande;
		this.dateCommande = dateCommande;
		this.numFactureCommand = numFactureCommand;
		this.pathFileFacture = pathFileFacture;
		this.ligneAchat = ligneAchat;
		this.etatCommande = etatCommande;
		this.compte = compte;
	}
	
	public String getEtatPaiement() {
		return etatPaiement;
	}

	public void setEtatPaiement(String etatPaiement) {
		this.etatPaiement = etatPaiement;
	}

	public double getMontantCommande() {
		return montantCommande;
	}

	public void setMontantCommande(double montantCommande) {
		this.montantCommande = montantCommande;
	}
	
	public Client getCompte() {
		return compte;
	}
	public void setCompte(Client compte) {
		this.compte = compte;
	}
	public int getId_adresseLivraison() {
		return id_adresseLivraison;
	}
	public void setId_adresseLivraison(int idAdresseLivraison) {
		id_adresseLivraison = idAdresseLivraison;
	}
	public int getId_adresseFacturation() {
		return id_adresseFacturation;
	}
	public void setId_adresseFacturation(int idAdresseFacturation) {
		id_adresseFacturation = idAdresseFacturation;
	}
	public int getId_typePaiement() {
		return id_typePaiement;
	}
	public void setId_typePaiement(int idTypePaiement) {
		id_typePaiement = idTypePaiement;
	}
	public int getId_typeLivraison() {
		return id_typeLivraison;
	}
	public void setId_typeLivraison(int idTypeLivraison) {
		id_typeLivraison = idTypeLivraison;
	}
	public void setId_commande(int idCommande) {
		id_commande = idCommande;
	}
	public void setDateCommande(Date dateCommande) {
		this.dateCommande = dateCommande;
	}
	public void setNumFactureCommand(String numFactureCommand) {
		this.numFactureCommand = numFactureCommand;
	}
	public void setPathFileFacture(String pathFileFacture) {
		this.pathFileFacture = pathFileFacture;
	}
	public void setLigneAchat(String ligneAchat) {
		this.ligneAchat = ligneAchat;
	}
	public void setEtatCommande(String etatCommande) {
		this.etatCommande = etatCommande;
	}
	public int getId_commande() {
		return id_commande;
	}
	public Date getDateCommande() {
		return dateCommande;
	}
	public String getNumFactureCommand() {
		return numFactureCommand;
	}
	public String getPathFileFacture() {
		return pathFileFacture;
	}
	public String getLigneAchat() {
		return ligneAchat;
	}
	public String getEtatCommande() {
		return etatCommande;
	}
	
	public Commande(int idCommande, String numFactureCommand,
			String pathFileFacture, String ligneAchat, String etatCommande) {
		super();
		id_commande = idCommande;
		
		this.numFactureCommand = numFactureCommand;
		this.pathFileFacture = pathFileFacture;
		this.ligneAchat = ligneAchat;
		this.etatCommande = etatCommande;
	}
	
	public static String genererNumeroFactureCommande() {
		return "test"+(new GregorianCalendar()).getTimeInMillis();
	}

}
